#include  <stdio.h>
char my_strcpy(char *s1,char *s2);
int my_strcam(char *s1,char *s2);
int main()
{ 
char n;
int m;
char s1[]={"hello"};
char s2[]={"hella"};
n=my_strcpy(s1,s2);
m=my_strcam(s1,s2);
printf("复制后为:%s\n",n);
printf("比较后为:%d\n",m);
}
char my_strcpy(char *s1,char *s2)
{
    while(*s1)
    {
        *s1=*s2;
        s1++;
        s2++;
        return s1;
    }
}
int my_strcam(char *s1,char *s2)
{
    while(*s1==*s2&&*s1&&*s2)
    {
        s1++;
        s2++;
        if (*s1<*s2)
        {
            return -1;
            break;
        }
        else if (*s1>*s2)
        {
            return 1;
            break;
        }
    }
    if (*s1==*s2)
    {
        return 0;
    }
}